package com.zjitc.bookshop39.mapper;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:徐莹
 * @Date:2025/04/25 12:18:51
 */


public interface AuthMapper  {
    @Select("SELECT t1.perms FROM sys_menu t1 \n" +
            "INNER JOIN role_menu t2 ON t2.menu_id = t1.id\n" +
            "INNER JOIN sys_role t3 ON t2.role_id = t3.id\n" +
            "INNER JOIN user_role t4 ON t3.id = t4.role_id\n" +
            "INNER JOIN sys_user t5 ON t5.id = t4.user_id\n" +
            "WHERE t5.id = #{id}")
    List<String> getPermsByUserId(Integer id);
}
